package org.example.test1;

public class Book {
    private String name;
    private int nums;

    //封装
    public void setNms(int nms) {
        if (nms > 0)
        this.nums = nms;
        else this.nums = 0;
    }
}
